home *** CD-ROM | disk | FTP | other *** search
- Path: druid.borland.com!usenet
- From: mstave@wpo.borland.com (Matt Stave)
- Newsgroups: comp.lang.c++
- Subject: Re: Newbie Q, please Help
- Date: Thu, 21 Mar 1996 03:31:42 GMT
- Organization: Borland International
- Message-ID: <4iqiki$ecj@druid.borland.com>
- References: <4ii7pc$d27@news-e2c.gnn.com> <4ik6g8$14k@reader2.ix.netcom.com>
- NNTP-Posting-Host: mstave2.borland.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- jlilley@ix.netcom.com (John Lilley) wrote:
-
- >In article <4ii7pc$d27@news-e2c.gnn.com>, ScottDrane@gnn.com says...
- >>
- >> I'm getting a linker error when trying to
- >>compile my latest project:
- >> Segment MYPROGRAM_TEXT exceeds 64K
-
- >You didn't mention the compiler, but they all have some option
- >like "far data threshold" or "segment threshold", which defaults
- >to something like 32k. Set this to something like 256.
-
- >Secondly if you have any large static arrays like:
- > int myData[2048];
- >make it explicitly far:
- > int far myData[2048];
-
- >Third, you can edit your DEF file and decrease the stack space
- >a bit to say, 10240, but be careful as that can cause stack
- >overflow problems.
-
- >> I tried to recompile under a different
- >>memory model, but the compiler told me
- >>Windows only works with the large model.
- >>Can anyone straighten me out?
-
- >This is not true -- Windows 3.x supports tiny, medium, compact,
- >and large -- but "large" model is the best you can do
- >under Windows 3.x without resorting to "huge", which is
- >not supported by the standard libraries. You could also
- >compile with Win32s and get a flat address space; that's
- >somewhat involved but may be worth it if the above does not help.
-
- >john lilley
-
- Segments with _TEXT in their names are usually code segments. You
- need to break your code into smaller pieces. This is accomplished in
- different ways with different compilers. One thing that may help
- regardless is to break up your source files into more, smaller files.
- Is there a source file that corresponds to the error message, i.e.
- zoooma.cpp and ZOOMA_TEXT? If so, it's a prime candidate for
- demolition....
-
- --- Matt
-
-